package com.happy.cat.project.system.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.happy.cat.project.system.domain.UserImAuthority;
import com.happy.cat.project.system.mapper.UserImAuthorityMapper;
import com.happy.cat.project.system.service.IUserImAuthorityService;
import org.springframework.stereotype.Service;

/**
 * 用户交互权限Service业务层处理
 *
 * @author verne
 * @date 2020-08-04
 */
@Service
public class UserImAuthorityServiceImpl extends ServiceImpl<UserImAuthorityMapper, UserImAuthority> implements IUserImAuthorityService {

    @Override
    public UserImAuthority getByUserId(Long userId) {
        return this.getOne(Wrappers.lambdaQuery(UserImAuthority.class).eq(UserImAuthority::getUserId, userId));
    }
}
